package com.deyinet.bdcms.core.bean;

import com.deyinet.bdcms.core.vo.Page;

/**
 * Created by Administrator on 2017/3/28 0028.
 */
public class DataTablePage {
    private int limit;
    private int offset;

    public DataTablePage() {
    }

    public int getLimit() {
        return this.limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getOffset() {
        return this.offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public <T> Page<T> getPage() {
        Page<T> page = new Page();
        page.setPageCurrent(this.offset / this.limit + 1);
        page.setPageSize(this.limit);
        return page;
    }
}
